package cn.com.guage.dtm.stat.service.impl;

import java.util.List;
import cn.com.guage.dtm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.guage.dtm.stat.mapper.StatDataCheckDetailMapper;
import cn.com.guage.dtm.stat.domain.StatDataCheckDetail;
import cn.com.guage.dtm.stat.service.IStatDataCheckDetailService;
import cn.com.guage.dtm.common.core.text.Convert;

/**
 * 数据检核分析详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-22
 */
@Service
public class StatDataCheckDetailServiceImpl implements IStatDataCheckDetailService 
{
    @Autowired
    private StatDataCheckDetailMapper statDataCheckDetailMapper;

    /**
     * 查询数据检核分析详情
     * 
     * @param checkDetailId 数据检核分析详情ID
     * @return 数据检核分析详情
     */
    @Override
    public StatDataCheckDetail selectStatDataCheckDetailById(Long checkDetailId)
    {
        return statDataCheckDetailMapper.selectStatDataCheckDetailById(checkDetailId);
    }

    /**
     * 查询数据检核分析详情列表
     * 
     * @param statDataCheckDetail 数据检核分析详情
     * @return 数据检核分析详情
     */
    @Override
    public List<StatDataCheckDetail> selectStatDataCheckDetailList(StatDataCheckDetail statDataCheckDetail)
    {
        return statDataCheckDetailMapper.selectStatDataCheckDetailList(statDataCheckDetail);
    }

    /**
     * 新增数据检核分析详情
     * 
     * @param statDataCheckDetail 数据检核分析详情
     * @return 结果
     */
    @Override
    public int insertStatDataCheckDetail(StatDataCheckDetail statDataCheckDetail)
    {
        statDataCheckDetail.setCreateTime(DateUtils.getNowDate());
        return statDataCheckDetailMapper.insertStatDataCheckDetail(statDataCheckDetail);
    }

    /**
     * 修改数据检核分析详情
     * 
     * @param statDataCheckDetail 数据检核分析详情
     * @return 结果
     */
    @Override
    public int updateStatDataCheckDetail(StatDataCheckDetail statDataCheckDetail)
    {
        statDataCheckDetail.setUpdateTime(DateUtils.getNowDate());
        return statDataCheckDetailMapper.updateStatDataCheckDetail(statDataCheckDetail);
    }

    /**
     * 删除数据检核分析详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStatDataCheckDetailByIds(String ids)
    {
        return statDataCheckDetailMapper.deleteStatDataCheckDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除数据检核分析详情信息
     * 
     * @param checkDetailId 数据检核分析详情ID
     * @return 结果
     */
    @Override
    public int deleteStatDataCheckDetailById(Long checkDetailId)
    {
        return statDataCheckDetailMapper.deleteStatDataCheckDetailById(checkDetailId);
    }
}
